package rickyGame.game.action.state
{
	import ricky.game.Actor;
	
	import ricky.game.Actor2D;
	import rickyGame.game.Fighter;
	import rickyGame.game.Player;
	
	/**
	 * 变形
	 */
	public class InstallModel extends StateAct
	{
		public function InstallModel(actor:Fighter, model:String, endTime:Number)
		{
			//TODO: implement function
			super(actor,null, endTime);
			_model=model;
		}
		
		override public function begin():void
		{
			this.actor.graphic.wear(_model);
			super.begin();
			Actor2D(actor).speed=Actor2D(actor).speed-80;
		}
		
		override public function end():void
		{
			var model:String=this.actor.data.model;
			this.actor.graphic.wear(model);
			Actor2D(actor).speed=Actor2D(actor).speed+80;
		}
		//
		private var _model:String;//模型
	}
}